package de.tum.in.eist.poll.shared.beans;

import de.tum.in.eist.poll.client.views.widgets.QuestionSingleChoiceWidget;
import de.tum.in.eist.poll.client.views.widgets.QuestionWidget;

public final class SingleChoiceQuestion extends Question {

	private String[] choices;
	
	public SingleChoiceQuestion(String description,	boolean optional, String[] choices) {
		super(description, optional);
		this.setChoices(choices);
	}

	/**
	 * @return the choices
	 */
	public String[] getChoices() {
		return choices;
	}

	/**
	 * @param choices the choices to set
	 */
	private void setChoices(String[] choices) {
		this.choices = choices;
	}

	/* (non-Javadoc)
	 * @see de.tum.in.eist.poll.shared.beans.Question#getWidget()
	 */
	@Override
	public QuestionWidget getWidget() {
		return new QuestionSingleChoiceWidget(this);
	}
}
